﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Particles2011
{
    class Particle
    {
        VertexPositionColor[] _pointList;
        const int Points = 8;
        short[] _triangleListIndices;
        private Vector3 Position;
        private Vector3 Velocity;
        Particle()
        {
            Position = Vector3.Zero;
            Velocity = Vector3.Up;
        }
        public void Update()
        {
            Position += Velocity;
        }

        public void Draw(GraphicsDevice graphicsDevice)
        {
            graphicsDevice.DrawUserIndexedPrimitives(
               PrimitiveType.TriangleList,
               _pointList,
               0,   // vertex buffer offset to add to each element of the index buffer
               8,   // number of vertices to draw
               _triangleListIndices,
               0,   // first index element to read
               6    // number of primitives to draw
           );
        }

    }
}
